home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
DR02.422
< prev
next >
Wrap
Text File
|
1993-03-04
|
5KB
|
186 lines
DR02.MOD Reworks the Q-scan and N-Scan!
Dr. Tweez #1 @3653
Sat Feb 27 16:52:36 1993
┌────────────────────────────────────────────────────────────────────────────┐
│ Mod Name : DR02.MOD Mod Author: Dr. Tweez 1@3653 SOLARnet │
│ Difficulty : ██▒▒▒▒▒▒▒▒ 1@3650 GATEWAY │
│ WWIV Version : 4.22 │
│ Mod Date : 02/28/93 │
│ Files Affected: MSGBASE1.C, FCNS.H │
│ Description : Reworks the Q-Scan, and N-Scan Funtions │
└────────────────────────────────────────────────────────────────────────────┘
══[ Description ]═════════════════════════════════════════════════════════════
I found this mod from Rocker, but it was for 4.20, so I reworked it and got
it to work on 4.22, I dont know if this has been released for 4.22 before, but
hey I didnt see it. This also uses one void from Tolkeins ENHANCE.C file.
══[ Step 1 ]══════════════════════════════════════════════════════════════════
Back up dat source!
══[ Step 2 ]══════════════════════════════════════════════════════════════════
Load up FCNS.H and put this in at the end of COM.C:
void clearscreen(); /*from Tolkeins ENHACNE.C*/
Save FCNS.H and move on.
══[ Step 3 ]══════════════════════════════════════════════════════════════════
Load up COM.C and place this void at the end of the file:
void clearscreen() /*From Tolkeins ENHANCE.C*/
/*
* This function clears the screen, using ANSI escape codes if the user
* has ANSI toggled on, else using the normal WWIV method of spitting out
* an ASCII 012.
*
*/
{
if (okansi()) {
outchr(12);
outstr("\x1b[2J");
} else {
outchr(12);
}
}
Save COM.C.
══[ Step 4 ]══════════════════════════════════════════════════════════════════
Load up MSGBASE1.C and replace these voids:
void qscan(int bn, int *ns)
void nscan(int ss)
with these voids:
void qscan(int bn, int *ns)
{
int i,nextsub,os,sn;
char s[81],s1[81];
unsigned long qscnptrx,sd;
sn=usub[bn].subnum;
if ((hangup) || (sn<0))
return;
qscnptrx=qsc_p[sn];
sd=sub_dates[sn];
if ((!sd) || (sd>qscnptrx)) {
nextsub=*ns;
os=cursub;
cursub=bn;
i=1;
iscan(cursub);
clearscreen();
if (okansi()) {
npr("7Now Scanning Sub-Board 2■\x1b[23D7Now Scanning Sub-Board 2■0");
nl();
sprintf(s,"7[══── 2[4 %s 2]7 ──══]0",
subboards[curlsub].name);
prt(1,s); nl();
} else {
pl("Now Scanning Sub-Board:");
sprintf(s,"8[ 9%s 8]",subboards[curlsub].name);
pl(s);
}
while ((i<=nummsgs) && (msgs[i].qscan<=qscnptrx))
++i;
if ((nummsgs>0) && (msgs[nummsgs].qscan<=qscnptrx)) {
qsc_p[curlsub]=status.qscanptr-1;
}
if ((nummsgs>0) && (i<=nummsgs))
if (msgs[i].qscan>qsc_p[curlsub])
scan(i,2,&nextsub);
cursub=os;
*ns=nextsub;
} else {
clearscreen();
if (okansi()) {
npr("9Now Scanning Sub-Board 2■\x1b[23D9Now Scanning Sub-Board ■0");
nl();
sprintf(s,"7[══── 2[4 %s 2]7 ──══]0",
subboards[sn].name);
prt(1,s);
nl();
} else {
pl("Now Scanning Sub-Board:");
sprintf(s,"[ %s ]",subboards[sn].name);
prt(1,s);
delay(10);
}
}
nl();
clearscreen();
}
void nscan(int ss)
{
int i,nextsub,abort,next;
nl();
nextsub=1;
clearscreen();
if (okansi())
pl("7[═── 2[4 Begin New Message Scan 2]7 ──═]0");
else
pl("[ Begin New Message Scan ]");
for (i=ss; (usub[i].subnum!=-1) && (i<num_subs) && (nextsub) && (!hangup); i++) {
if (qsc_q[usub[i].subnum/32]&(1L<<(usub[i].subnum%32)))
qscan(i,&nextsub);
abort=next=0;
checka(&abort,&next);
if (abort)
nextsub=0;
}
clearscreen();
if (okansi())
pl("7[═── 2[4 End Message Scan 2]7 ──═]0");
else
pl("[ End Message Scan ]");
nl();
nl();
if ((nextsub) && (thisuser.sysstatus & sysstatus_nscan_file_system) &&
((syscfg.sysconfig & sysconfig_no_xfer)==0)){
prt(2,"Scanning for new files . . . ");
nl();
nscanall();
nl();
prt(2,"Scan Done!");
nl();
}
}
Save MSGBASE1.C.
══[ Step 4 ]══════════════════════════════════════════════════════════════════
MAKE FCNS, and then recompile your BBS.
My thanks to Rocker for coming up with the idea, and Tolkein for ENHANCE.C
If ya use this mod drop me a line at
1@3653 SOLARnet
1@3650 GATEWAY